Skip to content

Conversation

Knerio
Copy link
Member

@Knerio Knerio commented Sep 22, 2025

close #559

@Knerio Knerio requested a review from Taucher2003 September 22, 2025 14:09
@Knerio Knerio self-assigned this Sep 22, 2025
@Knerio Knerio changed the base branch from main to 558-setup-actionmailer September 22, 2025 14:10
@Knerio Knerio requested a review from Copilot September 22, 2025 14:11
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR implements email verification functionality to address issue #559. The implementation includes email verification tokens, mailer functionality, and GraphQL mutations for verifying email addresses.

Key changes:

  • Added email verification services for sending and verifying email tokens
  • Implemented email verification workflow integrated with user registration and update processes
  • Created GraphQL mutation and corresponding tests for email verification

Reviewed Changes

Copilot reviewed 27 out of 27 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
app/models/user.rb Added token generation for email verification with 15-minute expiry
app/services/users/email_verification_service.rb Service to verify email tokens and update user verification status
app/services/users/email_verification_send_service.rb Service to send verification emails to users
app/mailers/user_mailer.rb Mailer class for sending email verification messages
app/graphql/mutations/users/email_verification.rb GraphQL mutation for email verification
db/migrate/20250919201730_add_email_verified_at_to_user.rb Database migration adding email verification timestamp
spec/support/shared_examples/sends_email.rb Fixed typo in shared example variable name
Multiple test files Added comprehensive test coverage for email verification functionality

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Copy link

github-actions bot commented Sep 22, 2025

GitLab Pipeline Action

General information

Link to pipeline: https://gitlab.com/code0-tech/development/sagittarius/-/pipelines/2097192623

Status: Passed
Duration: 4 minutes

Job summaries

rspec: [ee]

Coverage report available at https://code0-tech.gitlab.io/-/development/sagittarius/-/jobs/11701496176/artifacts/tmp/coverage/index.html
Test summary available at https://gitlab.com/code0-tech/development/sagittarius/-/pipelines/2097192623/test_report
Finished in 18.87 seconds (files took 10.14 seconds to load)
1174 examples, 0 failures
Line Coverage: 91.09% (3795 / 4166)
[TEST PROF INFO] Time spent in factories: 00:11.440 (47.95% of total time)

rspec: [ce]

Coverage report available at https://code0-tech.gitlab.io/-/development/sagittarius/-/jobs/11701496173/artifacts/tmp/coverage/index.html
Test summary available at https://gitlab.com/code0-tech/development/sagittarius/-/pipelines/2097192623/test_report
Finished in 21.85 seconds (files took 17.66 seconds to load)
1127 examples, 0 failures
Line Coverage: 90.39% (3642 / 4029)
[TEST PROF INFO] Time spent in factories: 00:12.800 (41.73% of total time)

rubocop

644 files inspected, no offenses detected

Base automatically changed from 558-setup-actionmailer to main October 9, 2025 19:52
Comment on lines 45 to 46
customizable_permission :verify_email
customizable_permission :send_verification_email
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These abilities don't make sense at the namespace level. Those are purely user level actions

subject(:service_response) { described_class.new(create_authentication(current_user), organization, params).execute }

shared_examples 'does not update' do
shared_examples 'user doesnt verify' do
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This rename doesn't make sense

subject(:service_response) { described_class.new(create_authentication(current_user), runtime, params).execute }

shared_examples 'does not update' do
shared_examples 'user doesnt verify' do
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here, shouldn't be renamed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Setup email verification

2 participants